package com.example.demo.service.dxy;

import com.example.demo.dao.dxy.IHomeDao;
import com.example.demo.entiy.dxy.Homelnfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
@Service
public class IHomeServicelmpl implements IHomeService {
    @Autowired
    IHomeDao iHomeDao;

    @Override
    public List<Homelnfo> findHomeAll() {
        List<Homelnfo> all = iHomeDao.findHomeAll();
        return all;
    }
    @Override
    public int addHomeInfo(String id,String username,String password,String birthday,String photo,String introduce,String usertype) {
        int addHomeInfo =iHomeDao.addHomeInfo(id,username,password,birthday,photo,introduce,usertype);
        return addHomeInfo;
    }
    @Override
    public int deleteHomeInfo(String id) {
        int userHomeInfo= iHomeDao.deleteHomeInfo(id);
        return userHomeInfo;
    }
    @Override
    public int updeteHomeInfo(String id,String username,String password,String birthday,String photo,String introduce,String usertype) {
        int updeteHomeInfo = iHomeDao.updeteHomeInfo(id,username,password,birthday,photo,introduce,usertype);
        return updeteHomeInfo;
    }
}
